﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Mall.Api.Migrations
{
    public partial class 数据库迁移 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "AuditInfo",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Parameters = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BrowserInfo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClientName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClientIpAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExecutionDuration = table.Column<int>(type: "int", nullable: false),
                    ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ReturnValue = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Exception = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MethodName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ServiceName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UserInfo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CustomData = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AuditInfo", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Brand",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BrandName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Brand", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Class",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ClassName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClassPriority = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Class", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "CommentsClasses",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    StarLevel = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CommentsClasses", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "CommodityProperty",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    PropertyName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CommodityProperty", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Jurisdiction",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    JurisdictionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Jurisdiction", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "OrderStatu",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    StatuName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_OrderStatu", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Payment",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    PaymentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Payment", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Resource",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ResourceName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Resource", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Roles",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RoleName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Roles", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Warehouse",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    WarehouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SupplierId = table.Column<int>(type: "int", nullable: false),
                    Province = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    City = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    QuantityInStock = table.Column<int>(type: "int", nullable: false),
                    UnsuppliedAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Warehouse", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "WebsiteInfo",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Owner = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Introduce = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Mailbox = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Url = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WebsiteICP = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PutOnRecords = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WebsiteInfo", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Supplier",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AccountName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AccountPassword = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SupplierName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RolesId = table.Column<int>(type: "int", nullable: false),
                    Owner = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ManagementTypes = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BrandId = table.Column<int>(type: "int", nullable: false),
                    Introduction = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Address = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Quantity = table.Column<int>(type: "int", nullable: false),
                    StoreName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Priority = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Supplier", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Supplier_Brand_BrandId",
                        column: x => x.BrandId,
                        principalTable: "Brand",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "CommodityPropertyValue",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CommodityPropertyId = table.Column<int>(type: "int", nullable: false),
                    PropertyValue = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ValuePrice = table.Column<double>(type: "float", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CommodityPropertyValue", x => x.Id);
                    table.ForeignKey(
                        name: "FK_CommodityPropertyValue_CommodityProperty_CommodityPropertyId",
                        column: x => x.CommodityPropertyId,
                        principalTable: "CommodityProperty",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "RolesJurisdiction",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    JurisdictionId = table.Column<int>(type: "int", nullable: false),
                    RolesId = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RolesJurisdiction", x => x.Id);
                    table.ForeignKey(
                        name: "FK_RolesJurisdiction_Jurisdiction_JurisdictionId",
                        column: x => x.JurisdictionId,
                        principalTable: "Jurisdiction",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_RolesJurisdiction_Roles_RolesId",
                        column: x => x.RolesId,
                        principalTable: "Roles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Users",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Nickname = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Username = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RolesId = table.Column<int>(type: "int", nullable: false),
                    Balance = table.Column<double>(type: "float", nullable: false),
                    Txcolor = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Bgcolor = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Users", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Users_Roles_RolesId",
                        column: x => x.RolesId,
                        principalTable: "Roles",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "WebsiteOtherInfo",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    WebsiteInfoId = table.Column<int>(type: "int", nullable: false),
                    InfoName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WebsiteOtherInfo", x => x.Id);
                    table.ForeignKey(
                        name: "FK_WebsiteOtherInfo_WebsiteInfo_WebsiteInfoId",
                        column: x => x.WebsiteInfoId,
                        principalTable: "WebsiteInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Commodity",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProductCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Introduction = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ClassId = table.Column<int>(type: "int", nullable: false),
                    SupplierId = table.Column<int>(type: "int", nullable: false),
                    Price = table.Column<double>(type: "float", nullable: false),
                    OriginalPrice = table.Column<double>(type: "float", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Commodity", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Commodity_Class_ClassId",
                        column: x => x.ClassId,
                        principalTable: "Class",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Commodity_Supplier_SupplierId",
                        column: x => x.SupplierId,
                        principalTable: "Supplier",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "GoodsReceivingInformation",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UsersId = table.Column<int>(type: "int", nullable: false),
                    Consignee = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CPhone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ShippingAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoodsReceivingInformation", x => x.Id);
                    table.ForeignKey(
                        name: "FK_GoodsReceivingInformation_Users_UsersId",
                        column: x => x.UsersId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "UserOrder",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UsersId = table.Column<int>(type: "int", nullable: false),
                    PaymentId = table.Column<int>(type: "int", nullable: false),
                    OrderStatuId = table.Column<int>(type: "int", nullable: false),
                    Number = table.Column<int>(type: "int", nullable: false),
                    OrderCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Total = table.Column<double>(type: "float", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserOrder", x => x.Id);
                    table.ForeignKey(
                        name: "FK_UserOrder_OrderStatu_OrderStatuId",
                        column: x => x.OrderStatuId,
                        principalTable: "OrderStatu",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_UserOrder_Payment_PaymentId",
                        column: x => x.PaymentId,
                        principalTable: "Payment",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_UserOrder_Users_UsersId",
                        column: x => x.UsersId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "UserShoppingTrolley",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UsersId = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserShoppingTrolley", x => x.Id);
                    table.ForeignKey(
                        name: "FK_UserShoppingTrolley_Users_UsersId",
                        column: x => x.UsersId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Comments",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CommodityId = table.Column<int>(type: "int", nullable: false),
                    CommentsClassId = table.Column<int>(type: "int", nullable: false),
                    UsersId = table.Column<int>(type: "int", nullable: false),
                    CommentContent = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Comments", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Comments_CommentsClasses_CommentsClassId",
                        column: x => x.CommentsClassId,
                        principalTable: "CommentsClasses",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Comments_Commodity_CommodityId",
                        column: x => x.CommodityId,
                        principalTable: "Commodity",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Comments_Users_UsersId",
                        column: x => x.UsersId,
                        principalTable: "Users",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "CommodityResources",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CommodityId = table.Column<int>(type: "int", nullable: false),
                    ResourceId = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CommodityResources", x => x.Id);
                    table.ForeignKey(
                        name: "FK_CommodityResources_Commodity_CommodityId",
                        column: x => x.CommodityId,
                        principalTable: "Commodity",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_CommodityResources_Resource_ResourceId",
                        column: x => x.ResourceId,
                        principalTable: "Resource",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "CommoditySKU",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CommodityId = table.Column<int>(type: "int", nullable: false),
                    CommodityPropertyId = table.Column<int>(type: "int", nullable: false),
                    CommodityIdPropertyValueId = table.Column<int>(type: "int", nullable: false),
                    CommodityPropertyValueId = table.Column<int>(type: "int", nullable: true),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CommoditySKU", x => x.Id);
                    table.ForeignKey(
                        name: "FK_CommoditySKU_Commodity_CommodityId",
                        column: x => x.CommodityId,
                        principalTable: "Commodity",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_CommoditySKU_CommodityProperty_CommodityPropertyId",
                        column: x => x.CommodityPropertyId,
                        principalTable: "CommodityProperty",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_CommoditySKU_CommodityPropertyValue_CommodityPropertyValueId",
                        column: x => x.CommodityPropertyValueId,
                        principalTable: "CommodityPropertyValue",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                });

            migrationBuilder.CreateTable(
                name: "CommodityWarehouse",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CommodityId = table.Column<int>(type: "int", nullable: false),
                    WarehouseId = table.Column<int>(type: "int", nullable: false),
                    AddNumber = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CommodityWarehouse", x => x.Id);
                    table.ForeignKey(
                        name: "FK_CommodityWarehouse_Commodity_CommodityId",
                        column: x => x.CommodityId,
                        principalTable: "Commodity",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_CommodityWarehouse_Warehouse_WarehouseId",
                        column: x => x.WarehouseId,
                        principalTable: "Warehouse",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "Order",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CommoditySKUId = table.Column<int>(type: "int", nullable: false),
                    UserOrderId = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Order", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Order_CommoditySKU_CommoditySKUId",
                        column: x => x.CommoditySKUId,
                        principalTable: "CommoditySKU",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Order_UserOrder_UserOrderId",
                        column: x => x.UserOrderId,
                        principalTable: "UserOrder",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "ShoppingCart",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CommoditySKUId = table.Column<int>(type: "int", nullable: false),
                    UserShoppingTrolleyId = table.Column<int>(type: "int", nullable: false),
                    IsActived = table.Column<bool>(type: "bit", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DisplayOrder = table.Column<int>(type: "int", nullable: false),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ShoppingCart", x => x.Id);
                    table.ForeignKey(
                        name: "FK_ShoppingCart_CommoditySKU_CommoditySKUId",
                        column: x => x.CommoditySKUId,
                        principalTable: "CommoditySKU",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_ShoppingCart_UserShoppingTrolley_UserShoppingTrolleyId",
                        column: x => x.UserShoppingTrolleyId,
                        principalTable: "UserShoppingTrolley",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.InsertData(
                table: "Brand",
                columns: new[] { "Id", "BrandName", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, "华为", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(3989), 0, true, false, "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(3992) },
                    { 2, "小米", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(4233), 0, true, false, "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(4235) },
                    { 3, "鸿星尔克", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(4237), 0, true, false, "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(4238) }
                });

            migrationBuilder.InsertData(
                table: "Class",
                columns: new[] { "Id", "ClassName", "ClassPriority", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, "手机", 1, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(4760), 0, true, false, "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(4762) },
                    { 2, "电脑", 2, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5148), 0, true, false, "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5150) },
                    { 3, "鞋子", 3, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5152), 0, true, false, "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5153) }
                });

            migrationBuilder.InsertData(
                table: "CommodityProperty",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "PropertyName", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5513), 0, true, false, "白色", "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5516) },
                    { 2, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5720), 0, true, false, "黑色", "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5722) },
                    { 3, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5724), 0, true, false, "红色", "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(5724) }
                });

            migrationBuilder.InsertData(
                table: "Jurisdiction",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "JurisdictionName", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 7, new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8380), 0, true, false, "图片权限", "", new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8381) },
                    { 4, new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8377), 0, true, false, "用户权限", "", new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8377) },
                    { 6, new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8378), 0, true, false, "角色权限", "", new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8379) },
                    { 2, new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8368), 0, true, false, "所有权限", "", new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8373) },
                    { 1, new DateTime(2021, 8, 19, 16, 45, 41, 689, DateTimeKind.Local).AddTicks(4964), 0, true, false, "无", "", new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(7170) },
                    { 3, new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8375), 0, true, false, "基本权限", "", new DateTime(2021, 8, 19, 16, 45, 41, 690, DateTimeKind.Local).AddTicks(8375) }
                });

            migrationBuilder.InsertData(
                table: "OrderStatu",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "StatuName", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(4513), 0, true, false, "", "已付款", new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(4516) },
                    { 2, new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(4737), 0, true, false, "", "未付款", new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(4740) }
                });

            migrationBuilder.InsertData(
                table: "Payment",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "PaymentName", "Remarks", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(3832), 0, true, false, "支付宝", "", new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(3836) },
                    { 2, new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(4056), 0, true, false, "微信", "", new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(4059) },
                    { 3, new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(4061), 0, true, false, "银行卡", "", new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(4062) }
                });

            migrationBuilder.InsertData(
                table: "Resource",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "ResourceName", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(3232), 0, true, false, "", "default.jpg", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(3236) },
                    { 2, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(3435), 0, true, false, "", "default.jpg", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(3438) }
                });

            migrationBuilder.InsertData(
                table: "Roles",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "RoleName", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(7788), 0, true, false, "", "普通用户", new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(7794) },
                    { 2, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(8073), 0, true, false, "", "管理员", new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(8076) },
                    { 3, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(8078), 0, true, false, "", "超级管理员", new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(8079) },
                    { 4, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(8080), 0, true, false, "", "供应商", new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(8081) }
                });

            migrationBuilder.InsertData(
                table: "Warehouse",
                columns: new[] { "Id", "City", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Province", "QuantityInStock", "Remarks", "SupplierId", "UnsuppliedAddress", "UpdatedTime", "WarehouseName" },
                values: new object[] { 1, "龙岩", new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(2249), 0, true, false, "福建", 100, "", 0, "上海", new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(2252), "就爱仓库" });

            migrationBuilder.InsertData(
                table: "WebsiteInfo",
                columns: new[] { "Id", "Address", "CreatedTime", "DisplayOrder", "Introduce", "IsActived", "IsDeleted", "Mailbox", "Owner", "Phone", "PutOnRecords", "Remarks", "UpdatedTime", "Url", "WebsiteICP" },
                values: new object[] { 1, "福建省龙岩市新罗区", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(1366), 0, "就爱科技有限公司", true, false, "1254412212@qq.com", "xiaoai", "15270759789", "京公网安备44010602000207", "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(1368), "www.9ihub.com", "京ICP备12020869号-2" });

            migrationBuilder.InsertData(
                table: "CommodityPropertyValue",
                columns: new[] { "Id", "CommodityPropertyId", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "PropertyValue", "Remarks", "UpdatedTime", "ValuePrice" },
                values: new object[,]
                {
                    { 1, 1, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(6074), 0, true, false, "16G", "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(6077), 0.0 },
                    { 2, 1, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(6462), 0, true, false, "32G", "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(6464), 0.0 },
                    { 3, 1, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(6466), 0, true, false, "64G", "", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(6467), 0.0 }
                });

            migrationBuilder.InsertData(
                table: "RolesJurisdiction",
                columns: new[] { "Id", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "JurisdictionId", "Remarks", "RolesId", "UpdatedTime" },
                values: new object[,]
                {
                    { 1, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(8727), 0, true, false, 1, "", 1, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(8729) },
                    { 2, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(9206), 0, true, false, 3, "", 2, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(9209) },
                    { 3, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(9211), 0, true, false, 2, "", 3, new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(9212) }
                });

            migrationBuilder.InsertData(
                table: "Supplier",
                columns: new[] { "Id", "AccountName", "AccountPassword", "Address", "BrandId", "CreatedTime", "DisplayOrder", "Introduction", "IsActived", "IsDeleted", "ManagementTypes", "Owner", "Phone", "Priority", "Quantity", "Remarks", "RolesId", "StoreName", "SupplierName", "UpdatedTime" },
                values: new object[] { 1, "1233444", "123456", "福建龙岩", 1, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(8490), 0, "阿凡达发发的发的", true, false, "fdaffd", "xiaoai", "15270759789", 1, 100, "", 4, "爱得发疯商店", "爱得发疯", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(8494) });

            migrationBuilder.InsertData(
                table: "Users",
                columns: new[] { "Id", "Balance", "Bgcolor", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Nickname", "Password", "Remarks", "RolesId", "Txcolor", "UpdatedTime", "Username" },
                values: new object[,]
                {
                    { 2, 1000.0, "blue", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(980), 0, true, false, "嘿", "123456", "", 1, "white", new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(983), "xiaoai" },
                    { 1, 10000.0, "blue", new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(9621), 0, true, false, "小可爱", "123456", "", 3, "white", new DateTime(2021, 8, 19, 16, 45, 41, 691, DateTimeKind.Local).AddTicks(9623), "xiaoyou" }
                });

            migrationBuilder.InsertData(
                table: "Commodity",
                columns: new[] { "Id", "ClassId", "CreatedTime", "DisplayOrder", "Introduction", "IsActived", "IsDeleted", "OriginalPrice", "Price", "ProductCode", "ProductName", "Remarks", "SupplierId", "UpdatedTime" },
                values: new object[] { 1, 1, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(6824), 0, "爱得发疯", true, false, 1000.0, 1000.0, "1233444", "啊反垄断法", "", 1, new DateTime(2021, 8, 19, 16, 45, 41, 692, DateTimeKind.Local).AddTicks(6826) });

            migrationBuilder.InsertData(
                table: "CommodityWarehouse",
                columns: new[] { "Id", "AddNumber", "CommodityId", "CreatedTime", "DisplayOrder", "IsActived", "IsDeleted", "Remarks", "UpdatedTime", "WarehouseId" },
                values: new object[] { 1, 1, 1, new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(1307), 0, true, false, "", new DateTime(2021, 8, 19, 16, 45, 41, 693, DateTimeKind.Local).AddTicks(1310), 1 });

            migrationBuilder.CreateIndex(
                name: "IX_Comments_CommentsClassId",
                table: "Comments",
                column: "CommentsClassId");

            migrationBuilder.CreateIndex(
                name: "IX_Comments_CommodityId",
                table: "Comments",
                column: "CommodityId");

            migrationBuilder.CreateIndex(
                name: "IX_Comments_UsersId",
                table: "Comments",
                column: "UsersId");

            migrationBuilder.CreateIndex(
                name: "IX_Commodity_ClassId",
                table: "Commodity",
                column: "ClassId");

            migrationBuilder.CreateIndex(
                name: "IX_Commodity_SupplierId",
                table: "Commodity",
                column: "SupplierId");

            migrationBuilder.CreateIndex(
                name: "IX_CommodityPropertyValue_CommodityPropertyId",
                table: "CommodityPropertyValue",
                column: "CommodityPropertyId");

            migrationBuilder.CreateIndex(
                name: "IX_CommodityResources_CommodityId",
                table: "CommodityResources",
                column: "CommodityId");

            migrationBuilder.CreateIndex(
                name: "IX_CommodityResources_ResourceId",
                table: "CommodityResources",
                column: "ResourceId");

            migrationBuilder.CreateIndex(
                name: "IX_CommoditySKU_CommodityId",
                table: "CommoditySKU",
                column: "CommodityId");

            migrationBuilder.CreateIndex(
                name: "IX_CommoditySKU_CommodityPropertyId",
                table: "CommoditySKU",
                column: "CommodityPropertyId");

            migrationBuilder.CreateIndex(
                name: "IX_CommoditySKU_CommodityPropertyValueId",
                table: "CommoditySKU",
                column: "CommodityPropertyValueId");

            migrationBuilder.CreateIndex(
                name: "IX_CommodityWarehouse_CommodityId",
                table: "CommodityWarehouse",
                column: "CommodityId");

            migrationBuilder.CreateIndex(
                name: "IX_CommodityWarehouse_WarehouseId",
                table: "CommodityWarehouse",
                column: "WarehouseId");

            migrationBuilder.CreateIndex(
                name: "IX_GoodsReceivingInformation_UsersId",
                table: "GoodsReceivingInformation",
                column: "UsersId");

            migrationBuilder.CreateIndex(
                name: "IX_Order_CommoditySKUId",
                table: "Order",
                column: "CommoditySKUId");

            migrationBuilder.CreateIndex(
                name: "IX_Order_UserOrderId",
                table: "Order",
                column: "UserOrderId");

            migrationBuilder.CreateIndex(
                name: "IX_RolesJurisdiction_JurisdictionId",
                table: "RolesJurisdiction",
                column: "JurisdictionId");

            migrationBuilder.CreateIndex(
                name: "IX_RolesJurisdiction_RolesId",
                table: "RolesJurisdiction",
                column: "RolesId");

            migrationBuilder.CreateIndex(
                name: "IX_ShoppingCart_CommoditySKUId",
                table: "ShoppingCart",
                column: "CommoditySKUId");

            migrationBuilder.CreateIndex(
                name: "IX_ShoppingCart_UserShoppingTrolleyId",
                table: "ShoppingCart",
                column: "UserShoppingTrolleyId");

            migrationBuilder.CreateIndex(
                name: "IX_Supplier_BrandId",
                table: "Supplier",
                column: "BrandId");

            migrationBuilder.CreateIndex(
                name: "IX_UserOrder_OrderStatuId",
                table: "UserOrder",
                column: "OrderStatuId");

            migrationBuilder.CreateIndex(
                name: "IX_UserOrder_PaymentId",
                table: "UserOrder",
                column: "PaymentId");

            migrationBuilder.CreateIndex(
                name: "IX_UserOrder_UsersId",
                table: "UserOrder",
                column: "UsersId");

            migrationBuilder.CreateIndex(
                name: "IX_Users_RolesId",
                table: "Users",
                column: "RolesId");

            migrationBuilder.CreateIndex(
                name: "IX_UserShoppingTrolley_UsersId",
                table: "UserShoppingTrolley",
                column: "UsersId");

            migrationBuilder.CreateIndex(
                name: "IX_WebsiteOtherInfo_WebsiteInfoId",
                table: "WebsiteOtherInfo",
                column: "WebsiteInfoId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AuditInfo");

            migrationBuilder.DropTable(
                name: "Comments");

            migrationBuilder.DropTable(
                name: "CommodityResources");

            migrationBuilder.DropTable(
                name: "CommodityWarehouse");

            migrationBuilder.DropTable(
                name: "GoodsReceivingInformation");

            migrationBuilder.DropTable(
                name: "Order");

            migrationBuilder.DropTable(
                name: "RolesJurisdiction");

            migrationBuilder.DropTable(
                name: "ShoppingCart");

            migrationBuilder.DropTable(
                name: "WebsiteOtherInfo");

            migrationBuilder.DropTable(
                name: "CommentsClasses");

            migrationBuilder.DropTable(
                name: "Resource");

            migrationBuilder.DropTable(
                name: "Warehouse");

            migrationBuilder.DropTable(
                name: "UserOrder");

            migrationBuilder.DropTable(
                name: "Jurisdiction");

            migrationBuilder.DropTable(
                name: "CommoditySKU");

            migrationBuilder.DropTable(
                name: "UserShoppingTrolley");

            migrationBuilder.DropTable(
                name: "WebsiteInfo");

            migrationBuilder.DropTable(
                name: "OrderStatu");

            migrationBuilder.DropTable(
                name: "Payment");

            migrationBuilder.DropTable(
                name: "Commodity");

            migrationBuilder.DropTable(
                name: "CommodityPropertyValue");

            migrationBuilder.DropTable(
                name: "Users");

            migrationBuilder.DropTable(
                name: "Class");

            migrationBuilder.DropTable(
                name: "Supplier");

            migrationBuilder.DropTable(
                name: "CommodityProperty");

            migrationBuilder.DropTable(
                name: "Roles");

            migrationBuilder.DropTable(
                name: "Brand");
        }
    }
}
